import { post } from '@/core/utils/http';
import type { Response, PayMethodListType } from '@/core/models';

/**  获取不同类型营销下单支持的配送方式 */
export const queryPayMethodList = () : Promise<Response<Array<PayMethodListType>>> => {
	return post('Api/Payments/GetList', {}, true);
}

/**  生成订单 */
export const queryCreateOrder = (data : any) : Promise<Response<any>> => {
	return post('Api/Order/CreateOrder', { data, }, true);
}

/**  获取支付信息 */
export const queryPaymentsCheckpay = (data : any) : Promise<Response<any>> => {
	return post('Api/Payments/CheckPay', { data, }, true);
}

/**  获取单个充值规则 */
export const queryTypeDetail = (data : any) : Promise<Response<any>> => {
	return post('Api/TopUp/getTypeDetail', { data, });
}

/**  支付接口 */
export const queryPay = (data : any) : Promise<Response<any>> => {
	return post('Api/User/Pay', { data, }, true);
}

/**  获取支付单详情 */
export const queryPaymentInfo = (data : any) : Promise<Response<any>> => {
	return post('Api/Payments/GetInfo', { data, }, true);
}